import React from 'react'
import {BrowserRouter, Route, Switch} from "react-router-dom";
import Signup from "./pages/Signup";
import Home from "./pages/Home";
import CssBaseline from "@material-ui/core/CssBaseline";
import Login from "./pages/Login";
import ResetPassword from "./pages/ResetPassword";
import AuthContextProvider from "./contexts/AuthContext";
import Profile from "./pages/Profile";
import ResetPasswordDone from "./pages/ResetPasswordDone";
import ResetPasswordConfirm from "./pages/ResetPasswordConfirm";
import ResetDone from "./pages/ResetDone";
import ChangePassword from "./pages/ChangePassword";
import UserActivation from "./pages/UserActivation";
import ResendActivation from "./pages/ResendActivation";
import ResendActivationDone from "./pages/ResendActivationDone";


function App() {
    return (
        <>
            <CssBaseline/>
            <AuthContextProvider>
                <BrowserRouter>
                    <Switch>
                        <Route exact path='/' component={Home}/>
                        <Route exact path='/signup' component={Signup}/>
                        <Route exact path='/login' component={Login}/>
                        <Route exact path='/profile' component={Profile}/>
                        <Route exact path='/reset_password' component={ResetPassword}/>
                        <Route exact path='/reset_password/done' component={ResetPasswordDone}/>
                        <Route exact path='/reset_password_confirm/:uid/:token' component={ResetPasswordConfirm}/>
                        <Route exact path='/reset/done' component={ResetDone}/>
                        <Route exact path='/change_password' component={ChangePassword}/>
                        <Route exact path='/activate/:uid/:token' component={UserActivation}/>
                        <Route exact path='/resend_activation' component={ResendActivation}/>
                        <Route exact path='/resend_activation/done' component={ResendActivationDone}/>
                    </Switch>
                </BrowserRouter>
            </AuthContextProvider>
        </>
    );
}

export default App;
